﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_quanliloaichuongtrinh : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        load();
    }
    private void load()
    {
        ASPxGridView1.DataSource = ChuongTrinh.GetDataLoaiChuongTrinh();
        ASPxGridView1.DataBind();
    }
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        string tenloaict = e.NewValues["tenloaict"].ToString();
        ChuongTrinh.InsertLoaiChuongTrinh(tenloaict);
        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        load();
    }
    
}